import React, {Component} from 'react'
import { NavLink } from 'react-router-dom'
class Home extends Component{
    render(){
        const { routes }=this.props
        return <div className="home">
            <div className="main">
                {
                    this.props.children
                }
            </div>
            <div className="footer">
                {
                    routes.map((item,idx)=>item.path? <NavLink
                        key={idx}
                        to={item.path}
                    >
                        {item.title}
                    </NavLink>: null)
                }
            </div>
        </div>
    }
}
export default Home